#ifndef ARME_H
#define ARME_H

#include <SFML\Graphics.hpp>
#include <SFML\Window.hpp>
#include <cstdlib>
#include "..\GamePlay\general.h"
#include "..\Unite\unite.h"
#include "..\GamePlay\map.h"

class Game;

class Arme
{
    public:
    Arme();
    ~Arme();
    Arme(int degat, int nb_tir, int repeat, int precision);
    void SetDegat(int degat, int nb_tir, int repeat, int precision);
    void SetBonus(int precision);
    void AfficherTir(sf::RenderWindow *app);
    void Tirer(float angle, sf::Vector2f position, bool flip);
    void Deplacer(sf::Vector2f vent, Terrain *terre, Game *jeu, std::vector<sf::Sprite> unite);
    sf::Vector2f GetPosition();
    int GetDegat();
    void SetFlip(bool flip);
    Arme& operator=(const Arme &arme2);

    private:
    std::vector<sf::Sprite*> m_tir;
    std::vector<sf::Vector2f> m_direction;
    std::vector<bool> alive;
    sf::Vector2f m_position;
    sf::Vector2f position;
    sf::Texture m_image;
    sf::SoundBuffer m_bufferballe;
    sf::Sound m_soundballe;
    int m_degat, m_nbtir, m_repeat, m_precision;
    int m_t;
    bool during;
    bool enTire, m_flip;
};

#endif // ARME_H
